package com.lz.football.module.techBar.view
{
	import com.common.utils.DisplayObjectUtil;
	import com.common.utils.Reflection;
	import com.lz.football.module.base.IComponent;
	
	import flash.display.MovieClip;
	
	import lz.controls.core.TitleWindow;

	/**
	 *规则 
	 * @author lake
	 * 
	 */	
	public class TechRulePanel extends TitleWindow implements IComponent
	{
		/**
		 *描述 
		 */		
		private var descMc :MovieClip;
		
		public function TechRulePanel()
		{
			super();
		}
		/**
		 *初始化 
		 * 
		 */	
		public function initUI(view:Object=null):void
		{
			_symbolSkin = Reflection.createInstance("com.football.techbar.view.ruleSkin");
			this.addChild(_symbolSkin);
			descMc = _symbolSkin.descMc;
			//背景框
			windowBg = _symbolSkin.windowBg;
			//设置可拖动
			dragEnabled = true;
			//设置关闭按钮
			setCloseBtn(_symbolSkin.closeBtn);
		}
		/**
		 *设置显示帧 
		 * @param index
		 * 
		 */		
		public function setFrame(index :int):void
		{
			//设置可拖动
			dragEnabled = true;
			descMc.gotoAndStop(index);
		}
		/**
		 *注册事件 
		 * 
		 */	
		public function addEvtListener():void
		{
		}
		/**
		 *删除事件 
		 * 
		 */	
		public function removeEvtListener():void
		{
		}
		/**
		 *销毁 
		 * 
		 */	
		public function destroyView():void
		{
			removeEvtListener();
			DisplayObjectUtil.removeAllChildren(this);
			DisplayObjectUtil.removeAllChildren(descMc);
			dragEnabled = false;
			_symbolSkin = null;
			descMc = null;
		}
	}
}